<template>
  <div class="home">
    <!-- 筛选 -->
    <div class="search_content">
      <van-nav-bar
        :title="$route.meta.title"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
      />
      <van-search
        v-model="requestParams.codeNo"
        placeholder="请输入车架号或者车牌号"
        shape="round"
        @search="initData"
        @clear="clearSearch"
      />
      <div class="search_item">
        <van-dropdown-menu :close-on-click-outside="false">
          <van-dropdown-item title="预约时间" ref="accidentRef">
            <div class="searchbox">
              <div class="insureList">
                <van-field
                  v-model="requestParams.startDateIn"
                  label="开始时间"
                  :placeholder="'请选择'"
                  input-align="right"
                  readonly
                  right-icon="arrow"
                  @click="showPickerDate = true"
                />
                <van-field
                  v-model="requestParams.endDateIn"
                  label="结束时间"
                  :placeholder="'请选择'"
                  input-align="right"
                  readonly
                  right-icon="arrow"
                  @click="showPickerDate1 = true"
                />
              </div>
              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleAccidentReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('accidentRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="所属服务顾问" ref="insureRef">
            <div class="searchbox">
              <van-field
                v-model="requestParams.fixCenterName"
                name="维修中心"
                label="维修中心"
                input-align="right"
                placeholder="请选择"
                readonly
                right-icon="arrow"
                @click="handleSelect('fixCenterId', 'fixCenterName')"
              />
              <van-field
                v-model="requestParams.serverPsnName"
                name="服务顾问"
                label="服务顾问"
                input-align="right"
                placeholder="请选择"
                readonly
                right-icon="arrow"
                @click="handleSelect('serverPsnId', 'serverPsnName')"
              />

              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('insureRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>

          <van-dropdown-item title="筛选" ref="statusRef">
            <div class="searchbox">
              <div class="title">预约单状态</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="item.check ? 'active' : ''"
                  v-for="(item, index) in statusList"
                  :key="index"
                  @click="handleSearchSelect(index, 'statusList')"
                >
                  {{ item.name }}
                </div>
              </div>

              <div class="title">预约类型</div>
              <div class="insureList">
                <div
                  class="insure_item"
                  :class="item.check ? 'active' : ''"
                  v-for="(item, index) in bookingTypeList"
                  :key="index"
                  @click="handleSearchSelect(index, 'bookingTypeList')"
                >
                  {{ item.name }}
                </div>
              </div>

              <div class="insureBtn">
                <van-button
                  size="small"
                  type="warning"
                  class="resetBtn"
                  @click="handleSelectReset()"
                >
                  重置
                </van-button>
                <van-button
                  size="small"
                  type="info"
                  class="confirmBtn"
                  @click="onConfirm('statusRef')"
                >
                  确认
                </van-button>
              </div>
            </div>
          </van-dropdown-item>
        </van-dropdown-menu>
        <!-- 服务顾问下拉 -->
        <van-popup v-model="showSelectPicker" position="bottom">
          <van-field
            name="模糊查询"
            v-if="
              likeWhoField == 'fixCenterId' || likeWhoField == 'serverPsnId'
            "
            input-align="left"
            v-model="likeWho"
            label="模糊查询"
            placeholder="请输入模糊查询关键词"
          />
          <van-picker
            show-toolbar
            :columns="columns"
            @confirm="handleSelectConfirm"
            @cancel="showSelectPicker = false"
            value-key="name"
          />
        </van-popup>
        <van-popup v-model="showPickerDate" position="bottom">
          <van-datetime-picker
            v-model="currentDate"
            type="date"
            @cancel="onCancelDate"
            @confirm="onConfirmDate"
            :formatter="formatter"
          />
        </van-popup>
        <van-popup v-model="showPickerDate1" position="bottom">
          <van-datetime-picker
            v-model="currentDate1"
            type="date"
            @cancel="onCancelDate1"
            @confirm="onConfirmDate1"
            :formatter="formatter"
          />
        </van-popup>
      </div>
    </div>
    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
      <van-list
        v-model="loading"
        :finished="finished"
        finished-text="没有更多了"
        @load="loadData"
        v-if="recordList && recordList.length != 0"
      >
        <!-- 列表 -->
        <div class="orderList" v-if="recordList && recordList.length != 0">
          <div
            class="orderItem"
            v-for="(item, index) in recordList"
            :key="index"
          >
            <div class="orderItem_header">
              <div class="orderItem_lt" @click="goDetail(item)">
                <div class="carNo flex">
                  {{ item.carNo }}
                  <div class="status">{{ item.billStatus }}</div>
                </div>
              </div>
              <div class="orderItem_rt">
                <a @click="handleTel(item.mobile1)">
                  <i class="iconfont icon-tel"></i>
                </a>
                <div
                  @click.stop="getExList(item)"
                  class="iconfont icon-wx"
                ></div>
              </div>
            </div>
            <div class="orderItem_content" @click="goDetail(item)">
              <div class="orderItem_data">
                <div class="order_label">客户名称</div>
                <div class="txt">{{ item.customerName }}</div>
              </div>
              <div class="orderItem_data">
                <div class="order_label">所属服务顾问</div>
                <div class="txt">{{ item.empName }}</div>
              </div>
              <div class="orderItem_data">
                <div class="order_label">车型</div>
                <div class="txt">{{ item.carModel }}</div>
              </div>
              <div class="orderItem_data">
                <div class="order_label">工单类型</div>
                <div class="txt">{{ item.workBillType }}</div>
              </div>
              <div class="orderItem_data time">
                <div class="order_label">预约进场时间</div>
                <div class="txt">{{ item.dateIn }}</div>
              </div>
              <div class="orderItem_data time remarkbox">
                <div class="flex">
                  <div class="order_label">预约备注</div>
                  <div class="remark_con">{{ item.remark }}</div>
                </div>

                <div class="remark_more" @click.stop="showRemark(item.remark)">
                  <i class="iconfont icon-more"></i>
                </div>
              </div>
            </div>
          </div>
        </div>
      </van-list>
      <van-empty class="noContent" description="暂无数据" v-else />
    </van-pull-refresh>

    <div class="addBtn">
      <div class="orderItem_filebox" @click="addApply('')">
        <i class="iconfont icon-add"></i>
        新增预约
      </div>
    </div>

    <div class="loading" v-if="loading">
      <van-loading size="30px" class="loadbox" color="#fff" text-color="#fff">
        加载中...
      </van-loading>
      <div class="mask"></div>
    </div>
    <van-dialog
      v-model="showDialog"
      title=""
      show-cancel-button
      :showConfirmButton="false"
    >
      <div class="contact_list">
        <div
          class="contact_item flex"
          v-for="(item, index) in contactList"
          :key="index"
        >
          <div class="contact_lt flex">
            <img v-if="item.avatar" class="contact_header" :src="item.avatar" />
            <div class="contact_name">
              {{ item.remark ? item.remark : item.name }}
            </div>
            <div class="contact_com_wx" v-if="item.type == 1">@微信</div>
            <div class="contact_com" v-if="item.type == 2">
              @{{ item.corpName ? item.corpName : item.corpFullName }}
            </div>
          </div>
          <div class="contact_btn" @click="runWxChat(item)">联系</div>
        </div>
      </div>
    </van-dialog>
  </div>
</template>

<script>
import Vue from "vue";
import {
  Search,
  DropdownMenu,
  DropdownItem,
  Empty,
  Dialog,
  Toast,
  Loading,
  Notify,
} from "vant";
import repairApi from "@/api/repairApi";
import commonApi from "@/api/commonApi";
import { getCookies, isPhone } from "@/utils/util.js";
import axios from "axios";
import qs from "qs";
const base_url = process.env.BASE_API;
export default {
  name: "applyRepair",
  components: {
    Search,
    DropdownMenu,
    DropdownItem,
    Empty,
    Dialog,
    Toast,
    Loading,
    Notify,
  },
  data() {
    return {
      value: "",
      carCouponList: [
        { name: "是", code: 1, check: false },
        { name: "否", code: 0, check: false },
      ],
      showPickerDate: false,
      showPickerDate1: false,
      currentDate: new Date(),
      currentDate1: new Date(),
      recordList: [
        // {
        //   billId: "", //单据ID
        //   vinCode: "", //车架号
        //   carNo: "", //车牌号
        //   customerName: "", //客户名称
        //   billStatus: "", //单据类型
        //   mobile1: "", //手机号1
        //   mobile12: "", //手机号2
        //   empName: "", //所属服务顾问
        //   carModel: "", //车型
        //   workBillType: "", //工单类型
        //   dateIn: "", //预约进场时间,
        // },
      ],
      columns: [],
      showSelectPicker: false,
      requestParams: {
        codeNo: "", //车架号或者车牌号，String，必填
        pageNo: 1, //当前页数，默认从1开始，每页显示十条，int，不能为空或者小于1
        startDateIn: "", //预约开始时间，日期yyyy-MM-dd
        endDateIn: "", //预约结束时间，日期yyyy-MM-dd
        fixCenterId: "", //维修中心ID值
        serverPsnId: "", //所属服务顾问，ID值
        billStatus: "", //预约单状态
        bookingType: "", //预约单类型
        fixCenterName: "",
        serverPsnName: "",
        userId: getCookies("userId"),
        enDateIn: "",
        billSatus: "",
      },
      statusIndex: null,

      statusList: [],
      bookingTypeList: [],
      // 分页参数
      loading: false,
      finished: false,
      refreshing: false,
      isLoadData: false,

      field: "",
      fieldName: "",
      fixCenterList: [],
      empList: [],
      showDialog: false,
      contactList: [],
      remarkVisble: false,
      likeWhoField: "",
      likeWho: "",
    };
  },
  watch: {
    likeWho: function (nval, oval) {
      if (this.likeWhoField == "fixCenterId") {
        if (nval) {
          let newArr = this.fixCenterList.filter((item) => {
            return item.name.indexOf(nval) > -1;
          });
          this.columns = newArr;
        } else {
          this.columns = this.fixCenterList;
        }
      }
      if (this.likeWhoField == "serverPsnId") {
        if (nval) {
          let newArr = this.empList.filter((item) => {
            return item.name.indexOf(nval) > -1;
          });
          this.columns = newArr;
        } else {
          this.columns = this.empList;
        }
      }
    },
  },

  mounted() {
    this.getBookingTypeList();
    this.getRepairBookBillStatus();
    this.getMainFixCenter();
    this.initData();
    this.getEmpPerson();
  },

  methods: {
    // 初始化列表
    initData() {
      this.requestParams.pageNo = 1;
      this.loadData();
    },
    // 获取列表
    loadData() {
      if (this.isLoadData) return;
      this.isLoadData = true;
      this.loading = true;
      this.finished = false;
      repairApi.queryRepairBooking({ ...this.requestParams }).then((res) => {
        if (this.requestParams.pageNo == 1) {
          this.recordList = res.data || [];
        } else {
          this.recordList = this.recordList.concat(res.data || []);
        }
        this.requestParams.pageNo += 1;

        if (res.data.length < 10) {
          this.finished = true;
          this.isLoadData = true;
        }
        this.isLoadData = false;
        this.loading = false;
      });
    },
    // 下拉刷新
    onRefresh() {
      // 清空列表数据
      this.recordList = [];
      this.finished = false;
      // 重新加载数据
      // 将 loading 设置为 true，表示处于加载状态
      this.loading = true;
      this.refreshing = false;
      this.initData();
    },
    // 获取维修中心
    getMainFixCenter() {
      commonApi
        .getMainFixCenter({
          fixCenterId: "",
          userId: this.requestParams.userId,
          type: "fixCenter",
        })
        .then((res) => {
          if (res.data) {
            this.fixCenterList = res.data;
          }
        });
    },
    // 获取服务人员
    getEmpPerson() {
      commonApi
        .getEmpPerson({
          fixCenterId: this.requestParams.fixCenterId,
          userId: this.requestParams.userId,
          type: "taskFollow",
        })
        .then((res) => {
          if (res.data) {
            this.empList = res.data;
          }
        });
    },
    getBookingTypeList() {
      commonApi
        .getEnums({
          key: "bookingType",
          userId: this.userId,
        })
        .then((res) => {
          if (res.data) {
            this.bookingTypeList = this.formatCheckData(res.data);
          }
        });
    },
    // 预约单状态
    getRepairBookBillStatus() {
      commonApi
        .getEnums({
          key: "repairBookBillStatus",
          userId: this.userId,
        })
        .then((res) => {
          if (res.data) {
            this.statusList = this.formatCheckData(res.data);
          }
        });
    },
    // 格式化多选数据
    formatCheckData(data) {
      data.forEach((item) => {
        item.check = false;
      });
      return data;
    },

    // 选择下拉
    handleSelect(field, fieldName) {
      if (this.disabled) {
        return;
      }
      if (field == "carCoupon") {
        this.columns = [
          { name: "是", value: 1 },
          { name: "否", value: 2 },
        ];
      } else if (field == "serverPsnId") {
        if (!this.requestParams.fixCenterId) {
          Toast("请先选择维修中心");
          return;
        }
        this.columns = this.empList;
      } else if (field == "fixCenterId") {
        this.columns = this.fixCenterList;
      }
      this.field = field;
      this.fieldName = fieldName;
      this.likeWhoField = field;
      this.showSelectPicker = true;
    },

    // 筛选是否
    handleCarSelect(index) {
      this.statusIndex = index;
    },
    // 筛选重置
    handleSelectReset(data) {
      this.statusList.forEach((item) => {
        item.check = false;
      });
      this.bookingTypeList.forEach((item) => {
        item.check = false;
      });
    },

    // 选择下拉确认
    handleSelectConfirm(value, index) {
      this.requestParams[this.field] = value.billId;
      this.requestParams[this.fieldName] = value.name;
      this.showSelectPicker = false;
      if (this.field == "fixCenterId") {
        this.getEmpPerson();
      }
      this.likeWho = "";
    },

    // 所属服务顾问
    handleReset() {
      this.requestParams.fixCenterId = "";
      this.requestParams.serverPsnId = "";
      this.requestParams.fixCenterName = "";
      this.requestParams.serverPsnName = "";
    },

    //时间重置
    handleAccidentReset() {
      this.requestParams.startDateIn = "";
      this.requestParams.endDateIn = "";
    },
    onConfirm(ref) {
      if (ref == "statusRef") {
        let checkList = [];
        let checkList1 = [];
        this.statusList.forEach((el) => {
          if (el.check) {
            checkList.push(el.value);
          }
          this.requestParams.billStatus = checkList.join(";");
        });
        this.bookingTypeList.forEach((el) => {
          if (el.check) {
            checkList1.push(el.value);
          }
          this.requestParams.bookingType = checkList1.join(";");
        });
      }
      this.initData();
      this.$refs[ref].toggle();
    },
    onConfirmDate() {
      this.requestParams.startDateIn = `${this.value1}-${this.value2}-${this.value3}`; // 字符串拼接 结果入2020-07-03
      this.onCancelDate();
    },
    onConfirmDate1() {
      this.requestParams.endDateIn = `${this.value1}-${this.value2}-${this.value3}`; // 字符串拼接 结果入2020-07-03
      this.onCancelDate1();
    },
    onCancelDate() {
      this.showPickerDate = false;
    },
    onCancelDate1() {
      this.showPickerDate1 = false;
    },
    // 日期组件自定义格式
    formatter(type, value) {
      if (type === "year") {
        this.value1 = value; // 可以拿到当前点击的数值
        return `${value}年`;
      } else if (type === "month") {
        this.value2 = value;
        return `${value}月`;
      }
      this.value3 = value;
      return `${value}日`;
    },

    // 获取list名称
    getFieldName(list, key, val) {
      if (list && list.length > 0) {
        let obj = list.filter((item) => {
          return item[key] == val;
        });
        if (obj.length > 0) {
          return obj[0].name;
        }
      }
      return null;
    },

    addApply() {
      this.$router.push({
        path: "/applyRepairEdit",
      });
    },
    goDetail(data) {
      localStorage.setItem("applyBillId", data.billId);
      this.$router.push({
        path: "/applyRepairDetail",
      });
    },

    handleSearchSelect(index, listKey) {
      this[listKey][index].check = !this[listKey][index].check;
    },
    clearSearch() {
      this.requestParams.codeNo = "";
      this.initData();
    },
    handleTel(tel) {
      if (isPhone()) {
        window.location.href = `tel:${tel}`;
      } else {
        Toast("请在手机端使用此功能");
      }
    },
    onClickLeft() {
      this.$router.go(-1);
    },
    // 获取外部联系人信息
    getExList(data) {
      axios({
        url: `${base_url}/proxy/ext/user/getExList`,
        method: "post",
        data: qs.stringify(
          // { url: 'http://wycl.autocnd.com:41080/ysc/assessManageDetail' },
          { carNo: data.carNo, name: data.customerName },
          { encode: false }
        ),
        headers: {
          "Content-Type": "application/x-www-form-urlencoded",
          satoken: getCookies("token"),
        },
      }).then((res) => {
        // res.data.data = [
        //   {
        //     userId: "liaoym@autocnd.com",
        //     name: "洪志雄",
        //     unionId: null,
        //     externalUserid: "wo8JAuCQAAyT5CZUPjtnGYbvqenIwmSA",
        //     remark: "闽C448JV",
        //     avatar:
        //       "http://wework.qpic.cn/wwhead/duc2TvpEgSQgUKEe0Fda8siaDeBLYBhfWS8DeTu0byw011j5icBY1GSllpe3Iia9WpY6nMic8ZYBaGY/0",
        //     remarkMobiles: [],
        //     errMessage: null,
        //     type: "2",
        //     corpName: "建发汽车人",
        //     corpFullName: "厦门建发汽车有限公司",
        //   },
        //   {
        //     userId: "liaoym@autocnd.com",
        //     name: "LaoFa",
        //     unionId: null,
        //     externalUserid: "wm8JAuCQAAU0a6qDIIwoDJTf_-Zc8Xqw",
        //     remark: "闽C448JV",
        //     avatar:
        //       "http://wx.qlogo.cn/mmhead/PiajxSqBRaELOgpV6Ed5Q1YjqZs9j7tODWb7O5pag8kCthenstk8TpQ/0",
        //     remarkMobiles: [],
        //     errMessage: null,
        //     type: "1",
        //     corpName: null,
        //     corpFullName: null,
        //   },
        // ];
        if (res.data && res.data.data && res.data.data.length != 0) {
          this.contactList = res.data.data;
          this.showDialog = true;
        } else {
          Notify({ type: "danger", message: "未找到相关联系人" });
        }

        console.log("获取外部联系人信息:", res);
      });
    },
    runWxChat(data) {
      let vm = this;
      axios({
        url: `${base_url}/proxy/qywx/jsdkConfig`,
        method: "post",
        data: qs.stringify(
          // { url: 'http://wycl.autocnd.com:41080/ysc/assessManageDetail' },
          { url: location.href.split("?")[0], type: "app" },
          { encode: false }
        ),
        headers: {
          "Content-Type": "application/x-www-form-urlencoded",
          satoken: getCookies("token"),
        },
      }).then((res) => {
        console.log("jsdkConfig:", res);
        let jsdk = res.data.data;
        localStorage.setItem("jsdk", JSON.stringify(res.data.data));
        wx.agentConfig({
          corpid: jsdk.corpid, // 必填，企业微信的corpid，必须与当前登录的企业一致
          agentid: jsdk.agentid, // 必填，企业微信的应用id （e.g. 1000247）
          timestamp: jsdk.timestamp, // 必填，生成签名的时间戳
          nonceStr: jsdk.nonceStr, // 必填，生成签名的随机串
          signature: jsdk.signature, // 必填，签名，见附录-JS-SDK使用权限签名算法
          jsApiList: ["openEnterpriseChat"], //必填，传入需要使用的接口名称
          success: function (res) {
            console.log("agentConfig权限成功返回信息:", res);
            wx.openEnterpriseChat({
              // 注意：userIds和externalUserIds至少选填一个。内部群最多2000人；外部群最多500人；如果有微信联系人，最多40人
              userIds: "", //参与会话的企业成员列表，格式为userid1;userid2;...，用分号隔开。
              externalUserIds: data.externalUserid, // 参与会话的外部联系人列表，格式为userId1;userId2;…，用分号隔开。
              groupName: "", // 会话名称。单聊时该参数传入空字符串""即可。
              chatId: "", // 若要打开已有会话，需指定此参数。如果是新建会话，chatId必须为空串
              success: function (res) {
                var chatId = res.chatId; //返回当前群聊ID，仅当使用agentConfig注入该接口权限时才返回chatId
                // 回调
              },
              fail: function (res) {
                Dialog.alert({
                  title: "提示",
                  message: "调用聊天窗口打开失败，请联系信息部进行处理",
                }).then(() => {
                  // on close
                });
                if (res.errMsg.indexOf("function not exist") > -1) {
                  alert("版本过低请升级");
                }
              },
            });
          },
          fail: function (res) {
            Dialog.alert({
              title: "提示",
              message: "调用聊天窗口鉴权失败，请联系信息部进行处理",
            }).then(() => {
              // on close
            });
            console.log("agentConfig权限失败返回信息:", res);
            if (res.errMsg.indexOf("function not exist") > -1) {
              alert("版本过低请升级");
            }
          },
        });
      });
    },
    showRemark(remark) {
      this.remarkVisble = true;
      Dialog({ message: remark, messageAlign: "left" });
    },
  },
};
</script>

<style lang="less" scoped="">
.home {
  background: #f3f3f3;
}
.search_content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
}
.searchbox {
  padding: 0.3rem;
  .title {
    font-size: 0.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.4rem;
    padding-top: 0.2rem;
  }
  .insureList {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    .insure_item {
      text-align: center;
      padding: 0.15rem 0rem;
      width: 30%;
      box-sizing: border-box;
      font-size: 0.28rem;
      border-radius: 3px;
      color: #666;
      margin-bottom: 0.2rem;
      margin-right: 5%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.5);
      &:nth-child(3n) {
        margin-right: 0;
      }
      &.active {
        box-shadow: 0px 0px 3px 0px #f65e07;
        color: #f65e07;
      }
    }
  }
  .insureBtn {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.4rem;
    .resetBtn {
      padding: 0 0.4rem;
      margin-right: 0.2rem;
    }
    .confirmBtn {
      padding: 0 0.4rem;
    }
  }
}

.orderList {
  padding-top: 3rem;
  margin: 0.3rem;
  overflow: hidden;
  // padding-bottom: 1.5rem;
  .orderItem {
    padding: 0.3rem;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 0.3rem;
    padding-bottom: 0;
    .orderItem_header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.3rem;
      padding-bottom: 0.2rem;
      border-bottom: 1px solid #f6f6f6;
      .orderItem_lt {
        .carNo {
          font-size: 0.3rem;
          color: #333;
          margin-right: 0.2rem;
          font-weight: bold;
        }
        .carVin {
          font-size: 0.28rem;
          color: #999;
          margin-top: 0.15rem;
        }
        .status {
          background: #35bc04;
          color: #fff;
          border-radius: 4px;
          font-size: 0.24rem;
          text-align: center;
          margin-left: 0.3rem;
          width: 1.4rem;
          padding: 0.1rem 0;
        }
      }
      .orderItem_rt {
        display: flex;
        align-items: center;
        align-self: center;
        justify-content: flex-start;
        .txt {
          font-size: 0.28rem;
          color: #161616;
        }
        .icon-tel {
          font-size: 0.64rem;
          color: #35bc04;
          margin-right: 0.1rem;
          position: relative;
          top: -2px;
          // color: #fff;
          // background: #35bc04;
          // font-size: 0.32rem;
          // padding: 0.1rem;
          // border-radius: 50%;
          // margin-right: 0.2rem;
        }
        .icon-wx {
          color: #409eff;
          font-size: 0.65rem;
        }
      }
    }
    .orderItem_content {
      display: flex;
      justify-content: flex-start;
      flex-wrap: wrap;
      align-items: center;
      .orderItem_data {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 50%;
        margin-bottom: 0.2rem;
        font-size: 0.28rem;
        box-sizing: content-box;
        color: #333;
        .order_label {
          font-size: 0.28rem;
          color: #333;
          width: 1.8rem;
        }
        .txt {
          font-size: 0.28rem;
          color: #666;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .remark_con {
          font-size: 0.28rem;
          color: #666;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          width: 4rem;
        }

        &.time {
          width: 100%;
        }
        &.remarkbox {
          justify-content: space-between;
          width: 7rem;
        }
        .remark_more {
          .icon-more {
            font-size: 0.28rem;
          }
        }
      }
    }
    .orderItem_file {
      background: #ebebeb;
      color: #333;
      border-radius: 5px;
      padding: 0.2rem 0;
      text-align: center;
      width: 100%;
      font-size: 0.28rem;
      display: flex;
      align-items: center;
      justify-content: center;
      .file_item {
        width: 33.33%;
        border-right: 1px solid #ccc;
        .icon-tel {
          font-size: 0.34rem;
          color: #35bc04;
          margin-right: 0.1rem;
        }
        .icon-mileage {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        .icon-gw {
          font-size: 0.4rem;
          color: #409eff;
          margin-right: 0.1rem;
          position: relative;
          top: 0.04rem;
        }
        &:last-child {
          border: none;
        }
      }
    }
  }
}
.addBtn {
  position: fixed;
  bottom: 0.8rem;
  width: 100%;
  z-index: 1;
  .orderItem_filebox {
    width: 2.8rem;
    margin: auto;
    text-align: center;
    font-size: 0.28rem;
    background: #409eff;
    color: #fff;
    padding: 0.25rem 0rem;
    border-radius: 50px;
  }
}
.noContent {
  margin-top: 2rem;
  background: #fff;
}
.contact_list {
  padding: 0.5rem 0.2rem 0 0.2rem;
  .contact_item {
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .contact_lt {
    font-size: 0.28rem;
    color: #23ec1c;
    .contact_header {
      width: 30px;
      height: 30px;
      display: block;
      border-radius: 5px;
      margin-right: 5px;
    }

    .contact_name {
      font-size: 0.28rem;
      color: #333;
      margin-left: 5px;
    }
    .contact_com {
      color: #f65e07;
      font-size: 0.28rem;
    }
    .contact_com_wx {
      color: #23ec1c;
      font-size: 0.28rem;
    }
  }
  .contact_btn {
    background: #409eff;
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 0.28rem;
  }
}
</style>
